#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
    string strA[10] = { "","","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz" };
public:
    void Combine(string digits, string st, int value, vector<string>& v)
    {
        if (digits[value] == '\0')
        {
            v.push_back(st);
            return;
        }
        string strB = strA[digits[value] - 48];
        for (int i = 0; i < strB.size(); i++)
        {
            Combine(digits, st + strB[i], value + 1, v);
        }
    }
    vector<string> letterCombinations(string digits) {
        vector<string> v;
        if (digits.size() == 0)
            return v;
        Combine(digits, "", 0, v);
        return v;
    }
};